<template>
	<view class="detail">
		<view class="pic">
			<image :src="detail.imgUrl" mode=""></image>
		</view>
		<view class="h1">公司简介</view>
		<view class="msg">{{detail.introduce}}</view>
		<view class="h1">运输方式</view>
		<view class="msg">{{detail.shippingMethod}}</view>
		<view class="h1">运费介绍</view>

		<view   class="msg" v-for="item,index in detail.priceList">{{item}} </view>

	</view>
</template>

<script setup>
	import {
		ref
	} from 'vue'
	import {
		onLoad
	} from "@dcloudio/uni-app"
	let id = 0;
	onLoad((params) => {
		id = params.id
		console.log(id);
		getDetails(id)
	})
	const detail = ref({})
	async function getDetails(id) {
		let res = await uni.$get("/prod-api/api/logistics-inquiry/logistics_company/" + id)
		console.log(res);
		detail.value = res.data
		detail.value.imgUrl = uni.$base_url + detail.value.imgUrl
		console.log(detail.value);
		uni.setNavigationBarTitle({
			title: detail.value.name
		})
	}
</script>

<style lang="scss">
	.detail {
		.pic {
			text-align: center;

			image {
				width: 80%;
				height: 200px;
				border: 1px solid #ccc;
			}
		}
	}
</style>